
typedef struct n{
				 int clef,info;
				 struct n *g,*d;
	             }noeud;


noeud *suppression(int clef)
{
noeud *r,*cour,*t,*pp;
if(r==NULL)
	return NULL;
else
{
cour=r;
while(1)
{
if(clef >  cour->clef)
 {
  if(cour->d==NULL)
  {
  
  return NULL;
  
  }
  else
   cour=cour->d;
  }
else if(clef < cour->clef)
 {
  if(cour->g==NULL)
  {
  return NULL;
  
  }
 else
    cour=cour->g;
 }
 else 
      break;
}
}
t=cour;
if(t->d==NULL) 
cour=cour->g;
else if(t->d->g==NULL)
{cour=cour->d;
cour->g=t->g;}
else 
{ pp=cour->d;
while(pp->g->g!=NULL) 
     pp=pp->g;
cour=pp->g;pp->g=cour->d;
cour->g=t->g;cour->d=t->d;}
if(clef==r->clef)
{r=cour;
free(t);}
else
{free(t);
 if(clef<r->clef) r->g=cour;
else r->d=cour;}
return(r);
}	